import { type RouteRecordRaw } from "vue-router"
const routes:RouteRecordRaw[]=[
    {
        path:"/",
        name:"Home",
        component:()=>import("@/layout/DefaultLayout.vue"),
        redirect:"/dashboard", //重定向
        //子路由
        children:[
            {
                path:"/dashboard",
                name:"Dashboard",
                component:()=>import("@/views/DashBoard/DashBoard.vue")
            },{
                path:"/chargingstation/Monitor",
                name:"monitor",
                component:()=>import("@/views/chargingstation/Monitor.vue")
            },{
                path:"chargingstation/Revenue",
                name:"revenue",
                component:()=>import("@/views/chargingstation/Revenue.vue")
            },{
                path:"/chargingstation/fault",
                name:"fault",
                component:()=>import("@/views/chargingstation/Fault.vue")
            },{
                path:"/document",
                name:"document",
                component:()=>import("@/views/document/Document.vue")
            },{
                path:"/map",
                name:"map",
                component:()=>import("@/views/map/ElectronicMap.vue")
            },{
                path:"/equipment",
                name:"equipment",
                component:()=>import("@/views/equipment/equipment.vue")
            },{
                path:"/operations/details",
                name:"details",
                component:()=>import("@/views/operations/details.vue")
            },
            {
                path:"/operations/Orders",
                name:"order",
                component:()=>import("@/views/operations/Orders.vue")
            },{
                path:"/operations/total",
                name:"total",
                component:()=>import("@/views/operations/total.vue")
            },{
                path:"/personal",
                name:"personal",
                component:()=>import("@/views/personal/Personal.vue")
            },{
                path:"/system",
                name:"system",
                component:()=>import("@/views/system/System.vue")
            },{
                path:"/alarm",
                name:"alarm",
                component:()=>import("@/views/alarm/Alarm.vue")
            }
        ]
    },
    {
        path:"/login",
        name:"Logon",   
        component:()=>import("@/views/Login.vue")
    },
    {
        //设置404
        path:"/:pathMatch(.*)*",
        name:"NotFound",
        component:()=>import("@/views/NotFound.vue")
    }
] 

export default routes